package ggze.esp.dao.inter;
import org.apache.ibatis.annotations.*;

import java.util.List;
import ggze.esp.entity.FspApi;

@Mapper
public interface FspApiDao {
    @Insert("insert into FSP_API (${name0}) values ('${value0}')")
    int add(@Param("name0")String n,@Param("value0")String v);

    @Delete("delete from FSP_API where ${name1}='${value1}'")
    int delete(@Param("name1")String n,@Param("value1")String v);

    @Update("update FSP_API set ${name2}='${value2}' where ${name4}='${value4}'")
    int update(@Param("name2")String n,@Param("value2")String v,@Param("name4")String va,@Param("value4")String vas);

    @Select("select * from FSP_API")
    List<FspApi> allSelect();

    @Select("select  * from FSP_API where ${name3}='${value3}'")
    FspApi isSelect(@Param("name3")String n, @Param("value3")String v);

    @Select("select  * from FSP_API where ${tjname}='${tjva}' order by uuid limit ${begin},${end}")
    List<FspApi> paging(@Param("tjname")String tjname, @Param("tjva")String tjva, @Param("begin")int begin, @Param("end")int end);

    @Select("select  * from FSP_API where ${ming}='${zhi}'")
    List<FspApi> isSelectSome(@Param("ming")String ming, @Param("zhi")String zhi);

    @Select("${sql}")
    FspApi custom(@Param("sql")String sql);

    @Select("select count(*) from FSP_API where ${sqlName}='${sqlVal}'")
    int getNum(@Param("sqlName")String sqlName,@Param("sqlVal")String sqlVal);
}